﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace FlyingHat.Core.Migrations
{
    public partial class modifyBook : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Count",
                table: "Book");

            migrationBuilder.AddColumn<string>(
                name: "BarCode",
                table: "Book",
                type: "varchar(50)",
                maxLength: 50,
                nullable: false,
                defaultValue: "")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "User",
                keyColumn: "Id",
                keyValue: 1L,
                columns: new[] { "CreatedTime", "LastLoginTime", "ModifyTime", "Password", "Salt" },
                values: new object[] { new DateTime(2022, 1, 6, 19, 0, 0, 693, DateTimeKind.Local).AddTicks(7048), new DateTime(2022, 1, 6, 19, 0, 0, 693, DateTimeKind.Local).AddTicks(7052), new DateTime(2022, 1, 6, 19, 0, 0, 693, DateTimeKind.Local).AddTicks(7043), "384C290C46B536300F1F8D9181C0E67B", "83C492C7E8FFEEDE7439D0DAA69901E87A4064C7FA9D40B34E05568EF338D123CC63D815" });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "BarCode",
                table: "Book");

            migrationBuilder.AddColumn<int>(
                name: "Count",
                table: "Book",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.UpdateData(
                table: "User",
                keyColumn: "Id",
                keyValue: 1L,
                columns: new[] { "CreatedTime", "LastLoginTime", "ModifyTime", "Password", "Salt" },
                values: new object[] { new DateTime(2021, 12, 30, 22, 8, 49, 653, DateTimeKind.Local).AddTicks(7506), new DateTime(2021, 12, 30, 22, 8, 49, 653, DateTimeKind.Local).AddTicks(7511), new DateTime(2021, 12, 30, 22, 8, 49, 653, DateTimeKind.Local).AddTicks(7491), "5EEE374AD805879365582F678FAA8313", "392049F7B9069451157CFB26DAD3F16D70674B188A2F0C967FF5982D603B6CFD5CC69C8A" });
        }
    }
}
